@ECHO OFF
CALL FindJDK.bat
SET lstf=_list.txt
FOR /F "usebackq tokens=*" %%G IN (`DIR /B /S Bot\*.java`) DO CALL :append "%%G"
IF EXIST doc RMDIR /S /Q doc >NUL
javadoc -d doc -windowtitle "RSBot" -linkoffline http://java.sun.com/javase/6/docs/api/ http://java.sun.com/javase/6/docs/api/ @%lstf%
DEL /F /Q %lstf%
START doc\index.html
GOTO :eof

:append
SET gx=%1
SET gx=%gx:\=\\%
ECHO %gx% >> "%lstf%"
GOTO :eof